<?php
/**
 * 前台公共管理控制器
 * Created by PhpStorm.
 * User: 许松
 * Date: 2017/1/5
 * Time: 20:55
 */

namespace Common\Controller;


class HomeController extends BaseController
{
	public function __construct()
	{
		parent::__construct();

//		dd($sessionData);
//		dd($_SESSION);
		if ( $_SESSION['cart']['goods'] && $_SESSION['uid']){
			$sessionData = $_SESSION['cart']['goods'];
			$cart_goods_num = count($sessionData);

			$this->assign('sessionData',$sessionData);
		}
		$cart_goods_num = isset($cart_goods_num) ? $cart_goods_num :0;
		$this->assign('cart_goods_num',$cart_goods_num);
	}

}